package com.example.demo.common;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 张
 * Date: 2024-08-20
 * Time: 19:32
 */

import lombok.Data;

/**
 * 表示一个消费者(完整的执行环境)
 */
@Data
public class ConsumerEnv {
    private String consumerTag; //身份标识
    private String queueName;//订阅的队列
    private boolean autoAck;//应答方式
    private Consumer consumer;//通过这个回调来处理消息

    public ConsumerEnv(String consumerTag, String queueName, boolean autoAck, Consumer consumer) {
        this.consumerTag = consumerTag;
        this.queueName = queueName;
        this.autoAck = autoAck;
        this.consumer = consumer;
    }
}
